home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
-
-
- N✓NA✓AM✓ME✓E
-
- cpp - a stand-alone C preprocessor
-
-
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
-
- c✓cp✓pp✓p [ -✓-C✓CT✓TV✓V ] [ -✓-P✓P[012] ] [ -✓-D✓Dname ]
-
- [ -✓-D✓Dname=✓=def ] [ -✓-I✓Idirectory ] [ -✓-U✓Uname ]
-
- [ -✓-a✓an✓ns✓si✓i ] [ -✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c ] [ -✓-f✓f[no-]c✓c+✓++✓+-✓-c✓co✓om✓mm✓me✓en✓nt✓ts✓s ]
-
- [ -✓-f✓f[no-]i✓im✓mp✓pl✓li✓ic✓ci✓it✓t-✓-n✓ne✓ew✓wl✓li✓in✓ne✓es✓s ]
-
- [ -✓-W✓W[no-]b✓ba✓ad✓d-✓-c✓ch✓ha✓ar✓rs✓s ] [ -✓-W✓W[no-]n✓ne✓es✓st✓te✓ed✓d-✓-c✓co✓om✓mm✓me✓en✓nt✓ts✓s ]
-
- [ -✓-W✓W[no-]b✓ba✓ad✓d-✓-c✓co✓on✓nc✓ca✓at✓t-✓-t✓to✓ok✓ke✓en✓ns✓s ] [ -✓-W✓W[no-]u✓un✓nk✓kn✓no✓ow✓wn✓n-✓-p✓pr✓ra✓ag✓gm✓ma✓a ]
-
- [ i✓in✓np✓pu✓ut✓t-✓-f✓fi✓il✓le✓e [ o✓ou✓ut✓tp✓pu✓ut✓t-✓-f✓fi✓il✓le✓e ] ]
-
-
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
-
-
-
- c✓cp✓pp✓p is a stand-alone C preprocessor, intended for use with C
-
- compilers such as HSC which do not provided access to
-
- preprocessor output. It implements translation phases 1 through
-
- 4 as specified by the standards document ANSI/ISO 9899-1990
-
- describing the C programming language, including trigraphs,
-
- token pasting and stringizing.
-
-
-
- c✓cp✓pp✓p optionally accepts two filenames as arguments. i✓in✓np✓pu✓ut✓t-✓-f✓fi✓il✓le✓e
-
- and o✓ou✓ut✓tp✓pu✓ut✓t-✓-f✓fi✓il✓le✓e are, respectively, the input and output files
-
- for the preprocessor. If not specified, or if given as `-',
-
- they default to the standard input and the standard output,
-
- respectively.
-
-
-
- O✓OP✓PT✓TI✓IO✓ON✓NS✓S
-
-
-
- -✓-C✓C
-
- Pass all comments (except those that appear on c✓cp✓pp✓p
-
- directive lines) through the preprocessor. By default,
-
- c✓cp✓pp✓p strips out C-style comments.
-
-
-
- -✓-P✓P[012]
-
- Preprocess the input without producing the line control
-
- information used by the next pass of the C compiler. A
-
- numeric argument can be passed to -P: 0 specifies that
-
- no line control information control is generated, and is
-
- equivalent to -P; 1 specifies that normal line control
-
- information is generated, which is the default; and 2
-
- specifies that line control information is generated in
-
- the form of preprocessor #✓#l✓li✓in✓ne✓e directives.
-
-
-
- -✓-T✓T
-
- Translate trigraphs in the input file. This behavior is
-
- implied by the -✓-a✓an✓ns✓si✓i option.
-
-
-
- -✓-D✓D name
-
- Define n✓na✓am✓me✓e as 1 (one). This is the same as if a
-
- -✓-D✓Dname=✓=1✓1 option appeared on the c✓cp✓pp✓p command line, or as
-
- if a
-
-
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 1
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
-
-
- #✓#d✓de✓ef✓fi✓in✓ne✓e name 1✓1
-
-
-
-
-
- line appeared in the source file that c✓cp✓pp✓p is
-
- processing.
-
-
-
- -✓-D✓Dname=✓=def
-
- Define n✓na✓am✓me✓e as if by a #✓#d✓de✓ef✓fi✓in✓ne✓e directive. This is the
-
- same as if a
-
-
-
-
-
- #✓#d✓de✓ef✓fi✓in✓ne✓e name d✓de✓ef✓f
-
-
-
-
-
- line appeared in the source file that c✓cp✓pp✓p is
-
- processing. The -✓-D✓D option has lower precedence than the
-
- -✓-U✓U option; that is, if the same name is used in both a
-
- -✓-U✓U option and a -✓-D✓D option, the name will be undefined
-
- regardless of the order of the options.
-
-
-
- -✓-I✓Idirectory
-
- Insert d✓di✓ir✓re✓ec✓ct✓to✓or✓ry✓y into the search path for #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e
-
- files with names not beginning with `/✓/', `\✓\´, or a drive
-
- specifier. d✓di✓ir✓re✓ec✓ct✓to✓or✓ry✓y is inserted ahead of the standard
-
- list of ``include'' directories. Thus, #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e files
-
- with names enclosed in double-quotes ("✓") are searched
-
- for first in the directory of the file with the #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e
-
- line, then in directories named with -✓-I✓I options, and
-
- lastly, in directories from the standard list. For
-
- #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e files with names enclosed in angle-brackets
-
- (<✓<>✓>), the directory of the file with the #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e line
-
- is not searched. See U✓US✓SA✓AG✓GE✓E below for exact details of
-
- this search order.
-
-
-
- -✓-S✓S[filename]
-
- Specify an alternate configuration file. If f✓fi✓il✓le✓en✓na✓am✓me✓e is
-
- present, the specified file is read instead of the
-
- default configuration file; if f✓fi✓il✓le✓en✓na✓am✓me✓e is absent, the
-
- default configuration file is simply not read. See
-
- U✓US✓SA✓AG✓GE✓E below for further details.
-
-
-
- -✓-U✓Uname
-
- Remove any initial definition of n✓na✓am✓me✓e, where n✓na✓am✓me✓e is a
-
- symbol that is predefined by the preprocessor.
-
-
-
- -✓-V✓V
-
- Print version information to s✓st✓td✓de✓er✓rr✓r.
-
-
-
- -✓-a✓an✓ns✓si✓i
-
- Define the preprocessor token _✓__✓_S✓ST✓TD✓DC✓C_✓__✓_ to have value 1,
-
- and enable trigraph translation. To get _✓__✓_S✓ST✓TD✓DC✓C_✓__✓_
-
- without trigraph translation, you can specify the
-
- options -✓-a✓an✓ns✓si✓i -✓-T✓T.
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 2
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- -✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c
-
- Issue warnings for constructs which, while recognized
-
- and accepted by most preprocessors, are not strictly
-
- allowed by the ANSI/ISO standard. Currently the
-
- following such constructs are recognized:
-
-
-
-
-
- * Numeric tokens which fall afoul of the new
-
- `preprocessing number' definition in ANSI/ISO 6.1.8,
-
- such as `0x123e+1'. With or without -✓-p✓pe✓ed✓da✓an✓nt✓ti✓ic✓c, c✓cp✓pp✓p will
-
- immediately retokenize the offending token in the
-
- expected manner.
-
-
-
- The following -✓-f✓f and -✓-W✓W options can be negated by adding a n✓no✓o-✓-
-
- before the option name. Some are on by default.
-
-
-
- -✓-f✓fc✓c+✓++✓+-✓-c✓co✓om✓mm✓me✓en✓nt✓ts✓s
-
- Support the C++ comment indicator `/✓//✓/´. With this option
-
- active, everything on the line after the /✓//✓/ is treated
-
- as a comment. Off by default.
-
-
-
- -✓-f✓fi✓im✓mp✓pl✓li✓ic✓ci✓it✓t-✓-n✓ne✓ew✓wl✓li✓in✓ne✓es✓s
-
- Allow string literals to have embedded newlines, as in
-
- the following example:
-
-
- "this is an
- example"
-
- This option allows c✓cp✓pp✓p to be used on code written for
-
- certain rather irritatingly nonstandard compilers (we
-
- won't mention GCC's name...). Off by default.
-
-
-
- -✓-W✓Wb✓ba✓ad✓d-✓-c✓ch✓ha✓ar✓rs✓s
-
- Issue a warning if a character that cannot legally
-
- appear in a C program appears in the input. On by
-
- default.
-
-
-
- -✓-W✓Wn✓ne✓es✓st✓te✓ed✓d-✓-c✓co✓om✓mm✓me✓en✓nt✓ts✓s
-
- Issue a warning if a comment-start character sequence
-
- (`/✓/*✓*´, and `/✓//✓/´ if -✓-f✓fc✓c+✓++✓+-✓-c✓co✓om✓mm✓me✓en✓nt✓ts✓s is active) appears in
-
- a comment. Off by default.
-
-
-
- -✓-W✓Wb✓ba✓ad✓d-✓-c✓co✓on✓nc✓ca✓at✓t-✓-t✓to✓ok✓ke✓en✓ns✓s
-
- Issue a warning if the token concatenation operator ##
-
- produces an illegal C token. On by default.
-
-
-
- -✓-W✓Wu✓un✓nk✓kn✓no✓ow✓wn✓n-✓-p✓pr✓ra✓ag✓gm✓ma✓a
-
- Issue a warning if the input contains a #✓#p✓pr✓ra✓ag✓gm✓ma✓a
-
- directive that c✓cp✓pp✓p does not recognize. Off by default.
-
-
-
- Options beginning with -✓-X✓X are for specialized interactions with
-
- particular programs, and should not generally be invoked
-
- directly by the user. The following such options are currently
-
- recognized:
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 3
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- -✓-X✓Xf✓fl✓lu✓uf✓ff✓f
-
- This option is used by the f✓fl✓lu✓uf✓ff✓f(1) source code
-
- checker. It causes the preprocessor token _✓__✓_F✓FL✓LU✓UF✓FF✓F_✓__✓_ to
-
- be defined, and enables certain related pragmas. See
-
- the f✓fl✓lu✓uf✓ff✓f(1) documentation for further information.
-
-
-
- U✓US✓SA✓AG✓GE✓E
-
- If you are familiar with C, you should already know about the
-
- basic workings of c✓cp✓pp✓p. We will not go into a detailed
-
- description here, since any good book on C could do better;
-
- instead, we will describe details particular to this
-
- implementation.
-
-
-
- Directory Search Order
-
-
-
-
-
- A file specified in an #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e directive will be searched for
-
- in the following directories, in order:
-
-
-
- 1.
-
- The directory of the file that contains the #✓#i✓in✓nc✓cl✓lu✓ud✓de✓e
-
- directive, if the directive is of the form `#✓#i✓in✓nc✓cl✓lu✓ud✓de✓e
-
- "filename"'.
-
-
-
- 2.
-
- The directories specified by -✓-I✓I options, in the order
-
- they were specified.
-
-
-
- 3.
-
- The list of directories specified in the I✓IN✓NC✓CL✓LU✓UD✓DE✓E
-
- environment variable, in order.
-
-
-
- Special Names
-
-
-
-
-
- The following macros are predefined by c✓cp✓pp✓p:
-
-
-
- _✓__✓_S✓ST✓TD✓DC✓C_✓__✓_
-
- Expands to 1 if the -✓-a✓an✓ns✓si✓i option is specified.
-
-
-
- _✓__✓_L✓LI✓IN✓NE✓E_✓__✓_
-
- Expands to an integer constant representing the current
-
- line number in the current input file.
-
-
-
- _✓__✓_F✓FI✓IL✓LE✓E_✓__✓_
-
- Expands to a string constant representing the name of
-
- the current input file.
-
-
-
- _✓__✓_D✓DA✓AT✓TE✓E_✓__✓_
-
- Expands to a string constant of the form "Mmm dd yyyy"
-
- representing the date on which preprocessing was
-
- initiated.
-
-
-
- _✓__✓_T✓TI✓IM✓ME✓E_✓__✓_
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 4
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- Expands to a string constant of the form "hh:mm:ss"
-
- representing the system time at which preprocessing was
-
- initiated.
-
-
-
- Configuration files
-
-
-
-
-
- c✓cp✓pp✓p uses a configuration file to set up site-specific predefined
-
- macros. By default, the directories specified in the L✓LI✓IB✓B
-
- environment variable are searched in order for the file
-
- c✓cp✓pp✓p_✓_d✓de✓ef✓fs✓s.✓.h✓h; an alternate file can be specified from the command
-
- line with the -✓-S✓S option.
-
-
-
- The configuration file is read just like a normal input file,
-
- except that text other than preprocessor directives is not
-
- passed through to the output file. Normally the configuration
-
- file will contain only comments and preprocessor directives. In
-
- addition, two special pragmas are recognized within the
-
- configuration file only:
-
-
-
- #pragma CPP_cmdline_arg o✓op✓pt✓ti✓io✓on✓n
-
- The single token o✓op✓pt✓ti✓io✓on✓n is processed as though it had
-
- appeared as a command-line option. The option may be
-
- undone from the command line, except as indicated
-
- below.
-
-
-
- #pragma CPP_delayed
-
- Normally, the configuration file is processed before
-
- command-line options are processed, to allow the
-
- commands therein to be overridden by command-line
-
- options. This pragma causes the command line to be
-
- processed before the remainder of the file, allowing
-
- conditional setup based on parameters set from the
-
- command line. Note that macro definitions and
-
- command-line specifications made after this pragma
-
- cannot be undone from the command line.
-
-
-
- For example, the following configuration file activates C++
-
- comments by default, and sets the macro _✓_P✓PR✓RO✓OT✓TO✓O(✓()✓) according to
-
- the presence of the -✓-a✓an✓ns✓si✓i option:
-
-
- #pragma CPP_cmdline_arg -fc++-comments
- #pragma CPP_delayed
- #ifdef __STDC__
- # define _PROTO(x) x
- #else
- # define _PROTO(x) ()
- #endif
-
-
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
-
- f✓fl✓lu✓uf✓ff✓f(1)
-
-
-
- Documentation for your C compiler
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 5
-
-
-
-
-
-
-
-
-
- CPP (1) 30 May 1993 CPP (1)
-
-
-
-
-
-
-
- Any good book on C.
-
-
-
- D✓DI✓IA✓AG✓GN✓NO✓OS✓ST✓TI✓IC✓CS✓S
-
-
-
- The error messages produced by c✓cp✓pp✓p are intended to be
-
- self-explanatory. The line number and filename where the error
-
- occurred are printed along with the diagnostic.
-
-
-
- B✓BU✓UG✓GS✓S
-
- None that I know of, but there's almost always One More Bug(TM).
-
- If you should find one, please report it to me, Scott Bigham, at
-
- dsb@cs.duke.edu.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tue Mar 14 00:38:45 1995 Page 6
-
-
-
-
-
-